//
//  NameAndPositionTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/15.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "NameAndPositionTableViewCell.h"

@implementation NameAndPositionTableViewCell{
    GLGWImageView * nameImageView;
    GLGWLabel * carTypeLabel;
    GLGWLabel * resulelabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        nameImageView  = [[GLGWImageView alloc] initWithImageName:@"gg" inSuperView:self.contentView];
        nameImageView.backgroundColor = kRandomColor;
        [nameImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView);
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(33));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(104)));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(165)));
        }];
        //
        carTypeLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        carTypeLabel.text = @"您的自由经理人身份认证未通过";
        [carTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self->nameImageView.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(13));
            make.centerX.equalTo(self.contentView);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        resulelabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self.contentView];
        resulelabel.text = @"证件不清晰";
        [resulelabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView);
            make.top.equalTo(self->carTypeLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(8));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        GLGWButton * butComit = [[GLGWButton alloc] initWithTitle:@"重新认证" titleLableFont:SYSTEMFONT(12) titleLableColor:[UIColor whiteColor] theCornerRadius:kHeightProportion_In_iPhoneTriploid(15) backgroundColr:kColor_Rule_Yellow inSuperView:self.contentView];
        [butComit mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView);
            make.top.equalTo(self->resulelabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(28));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(130)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(30)));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(38));
        }];
        [butComit addTarget:self action:@selector(comitAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

-(void)comitAction{
    if (self.Block_namePositionComint) {
        self.Block_namePositionComint();
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
